package com.example.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.neo4j.core.schema.*;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import static org.springframework.data.neo4j.core.schema.Relationship.Direction.INCOMING;
import static org.springframework.data.neo4j.core.schema.Relationship.Direction.OUTGOING;

/**
 *
 */
@Node("KnowledgeElement")
public class KnowledgeElement implements Serializable {
    @Id
    @GeneratedValue
    private Long id;

    @Property("content")
    private String content;


    @Property("logic_id")
    private String logic_id;

    @Property("order")
    private String order;


    @Property("hasChild")
    private Boolean hasChild = false;

    @Property("hasParent")
    private Boolean hasParent = false;

    @Relationship(type = "KE", direction = INCOMING)
    // @JsonIgnore
    private List<Event> eventList = new LinkedList<>();

    @Relationship(type = "KE_TO_FILE", direction = OUTGOING)
    // @JsonIgnore
    private List<FileNode> fileNodeList = new LinkedList<>();


    private List<Long> imageIdList = new LinkedList<>();
    private Long pdfId;




    // 仅仅作为前后端数据传输
    private String year;
    // 仅仅作为前后端数据传输
    private String month;
    // 仅仅作为前后端数据传输
    private int ke_index;
    // 仅仅作为前后端数据传输
    private String imagePath;

    public KnowledgeElement(String content, String logic_id, String order) {
        this.content = content;

        this.logic_id = logic_id;
        this.order = order;

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }



    public String getLogic_id() {
        return logic_id;
    }

    public void setLogic_id(String logic_id) {
        this.logic_id = logic_id;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }



    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getMonth() {
        return month;
    }

    public void setMonth(String month) {
        this.month = month;
    }

    public int getKe_index() {
        return ke_index;
    }

    public void setKe_index(int ke_index) {
        this.ke_index = ke_index;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }


    public List<Event> getEventList() {
        return eventList;
    }

    public void setEventList(List<Event> eventList) {
        this.eventList = eventList;
    }

    public List<FileNode> getFileNodeList() {
        return fileNodeList;
    }

    public void setFileNodeList(List<FileNode> fileNodeList) {
        this.fileNodeList = fileNodeList;
    }

    public List<Long> getImageIdList() {
        return imageIdList;
    }

    public void setImageIdList(List<Long> imageIdList) {
        this.imageIdList = imageIdList;
    }

    public Long getPdfId() {
        return pdfId;
    }

    public void setPdfId(Long pdfId) {
        this.pdfId = pdfId;
    }

    public Boolean getHasChild() {
        return hasChild;
    }

    public void setHasChild(Boolean hasChild) {
        this.hasChild = hasChild;
    }

    public Boolean getHasParent() {
        return hasParent;
    }

    public void setHasParent(Boolean hasParent) {
        this.hasParent = hasParent;
    }
}
